import { App } from 'vue'
import { 
  ElButton,
  ElDialog,
  ElInput,
  ElForm,
  ElFormItem,
  ElTable,
  ElTableColumn,
  ElPagination,
  ElCard,
  ElCheckbox,
  ElLink,
  ElAvatar,
  ElMessage,
  ElIcon
} from 'element-plus'

// Element Plus组件列表
const components = [
  ElButton,
  ElDialog,
  ElInput,
  ElForm,
  ElFormItem,
  ElTable,
  ElTableColumn,
  ElPagination,
  ElCard,
  ElCheckbox,
  ElLink,
  ElAvatar,
  ElIcon
]

// 注册全局组件
export function registerElementComponents(app: App): void {
  components.forEach(component => {
    if (component.name) {
      app.component(component.name, component)
    }
  })
} 